-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[export] [cc] Support ti.RecordGroupHint to group launched kernels #1880
Conversation
31885f7
to
99bd92a
Compare
Codecov Report
@@ Coverage Diff @@
## master #1880 +/- ##
==========================================
+ Coverage 43.25% 43.80% +0.54%
==========================================
Files 44 45 +1
Lines 6320 6168 -152
Branches 1092 1097 +5
==========================================
- Hits 2734 2702 -32
+ Misses 3416 3297 -119
+ Partials 170 169 -1
Continue to review full report at Codecov.
|
@yuanming-hu I will merge this in 24 hours if you don't reject me, otherwise our work in TaichiActor will be blocked, thank for understanding. |
I am so sorry that I didn't see your request until today, I will review your code asap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! I reviewed your code and I thought it is very very useful to record the launch order in group.
However, when I tried to run demo_record_group_hint.py
I got:
[I 09/21/20 19:45:31.023] [action_recorder.cpp:start_recording@27] ActionRecorder: start recording to [record.yml]
[W 09/21/20 19:45:31.023] [init.py:adaptive_arch_select@552] Arch=[Arch.cc] is not supported, falling back to CPU
[Taichi] Starting on arch=x64
Traceback (most recent call last):
File "demo_record_group_hint.py", line 22, in
with ti.RecordGroupHint('my_substep'):
File "/Users/liujiafeng/playground/projects/taichi/python/taichi/core/record.py", line 33, in init
if name in recorded:
NameError: name 'recorded' is not defined
I think the variable recorded
in RecordGroupHint
class may be the reason. Could you please help me to run this file correctly? Thanks a lot!
python/taichi/core/record.py
Outdated
|
||
class RecordGroupHint: | ||
def __init__(self, name): | ||
if name in recorded: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this is correct. Maybe you should use RecordGroupHint.record
or self.record
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! LGTM! Thanks for writing such useful tool! By the way, can we record kernels in group for other backends, such as metal?
Related issue = [数据删除]
[Click here for the format server]
I need this for exporting
mpm_lagrangian_forces
.